3.2522 \(\int \frac{a+b x^n}{x} \, dx\)

Optimal. Leaf size=13 \[ a \log (x)+\frac{b x^n}{n} \]

[Out]

(b*x^n)/n + a*Log[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0064349, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {14} \[ a \log (x)+\frac{b x^n}{n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)/x,x]

[Out]

(b*x^n)/n + a*Log[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{a+b x^n}{x} \, dx &=\int \left (\frac{a}{x}+b x^{-1+n}\right ) \, dx\\ &=\frac{b x^n}{n}+a \log (x)\\ \end{align*}

Mathematica [A]  time = 0.0077219, size = 13, normalized size = 1. \[ a \log (x)+\frac{b x^n}{n} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)/x,x]

[Out]

(b*x^n)/n + a*Log[x]

________________________________________________________________________________________

Maple [A]  time = 0., size = 19, normalized size = 1.5 \begin{align*}{\frac{b{x}^{n}}{n}}+{\frac{a\ln \left ({x}^{n} \right ) }{n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n)/x,x)

[Out]

b*x^n/n+1/n*a*ln(x^n)

________________________________________________________________________________________

Maxima [A]  time = 0.972991, size = 24, normalized size = 1.85 \begin{align*} \frac{b x^{n}}{n} + \frac{a \log \left (x^{n}\right )}{n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="maxima")

[Out]

b*x^n/n + a*log(x^n)/n

________________________________________________________________________________________

Fricas [A]  time = 1.00169, size = 32, normalized size = 2.46 \begin{align*} \frac{a n \log \left (x\right ) + b x^{n}}{n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="fricas")

[Out]

(a*n*log(x) + b*x^n)/n

________________________________________________________________________________________

Sympy [A]  time = 0.200986, size = 17, normalized size = 1.31 \begin{align*} \begin{cases} a \log{\left (x \right )} + \frac{b x^{n}}{n} & \text{for}\: n \neq 0 \\\left (a + b\right ) \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)/x,x)

[Out]

Piecewise((a*log(x) + b*x**n/n, Ne(n, 0)), ((a + b)*log(x), True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b x^{n} + a}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="giac")

[Out]

integrate((b*x^n + a)/x, x)